package com.snuproject.lgt.activity;

import com.snuproject.lgt.R;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.RelativeLayout;

public class ActivityResult extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_result);
        
        Intent intent = getIntent();
        
        Bundle extras = intent.getExtras();
        byte[] imgData = extras.getByteArray("img_data");
        Bitmap img = BitmapFactory.decodeByteArray(imgData, 0, imgData.length);
        ImageView ivResult = (ImageView)findViewById(R.id.result_img_test);
        Bitmap resized = Bitmap.createScaledBitmap(img, 400, 240, true);
    
        ivResult.setImageBitmap(resized);
        //ivResult.setImageResource(R.drawable.ano);
        //addContentView(ivResult, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
        
    }

    public void onClickRetry(View view) {
    	Intent intent = new Intent(this, ActivityPhoto.class);
    	intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
    	startActivity(intent);
    }

    public void onClickTheme(View view) {
    	Intent intent = new Intent(this, ActivitySelectTheme.class);
    	intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
    	startActivity(intent);
    }

    public void onClickSave(View view) {
    }
}
